From 807acca58a3b391802491cf078a10dd4b5bfc655 Mon Sep 17 00:00:00 2001 From: Gabriel Wicke Date: Thu, 3 Jun 2004 00:54:18 +0000 Subject: [PATCH] additional smaxage parameter --- includes/RawPage.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/RawPage.php b/includes/RawPage.php index b218612a96..4f4da38c50 100644 --- a/includes/RawPage.php +++ b/includes/RawPage.php @@ -21,12 +21,14 @@ class RawPage { $charset = $wgRequest->getText( 'charset' ); $this->mCharset = !empty($charset) ? $charset : $wgInputEncoding; + $smaxage = $wgRequest->getText( 'smaxage' ); + $this->mSmaxage = !empty($smaxage) ? $smaxage : 0; $this->mOldId = $wgRequest->getInt( 'oldid' ); } function view() { header( "Content-type: ".$this->mContentType.'; charset='.$this->mCharset ); # allow the client to cache this for 24 hours - header( 'Cache-Control: s-maxage=0, max-age=86400' ); + header( 'Cache-Control: s-maxage='.$this->mSmaxage.', max-age=86400' ); echo $this->getrawtext(); wfAbruptExit(); } -- 2.20.1